package com.alingrad.android.froyoengine.test.multitouch;

import android.app.Activity;
import android.os.Bundle;

import com.alingrad.android.froyoengine.Game;
import com.alingrad.android.froyoengine.GameProperties;
import com.alingrad.android.froyoengine.GameRenderer;
import com.alingrad.android.froyoengine.GameSurfaceView;

public class GameActivity extends Activity {
	private GameSurfaceView mView;
	private Game mGame;
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        GameProperties.WIDTH = 800;
        GameProperties.HEIGHT = 480;
        GameProperties.IS_DEBUGGING = true;
        mGame = new Game(this, new MultiTouchTestMainLoop());
        GameRenderer renderer= new GameRenderer(mGame);
        mView = new GameSurfaceView(this);
        mView.setRenderer(renderer);
        setContentView(mView);
//        Debug.startMethodTracing("Test");
    }
    
    @Override
    protected void onPause() {
    	super.onPause();
    	mView.onPause();
    	mGame.onPause();
    	finish();
//    	Debug.stopMethodTracing();
    }
    
    @Override
    protected void onResume() {
    	super.onResume();
    	mGame.onResume();
    	mView.onResume();
    }
}